<!doctype html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../css/style.css" />
		<link rel="stylesheet" href="../css/iconfont.css " />
		<link href="../css/calendar/calendar.css" rel="stylesheet"/>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav ding-bar">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">公司公告</h1>
		</header>
		<div class="mui-content">
		    <div id="tongzhi" >
		    	 <!--下拉刷新容器-->
			    <div id="pullrefresh" class="newslist w620 mui-scroll-wrapper" style="position: static;">
					<!--数据列表-->
				    <div class="mui-scroll conferDiv" style="position: static;">
				    	 <ul class="gg-list gg-list-gl">
				    		<!--<li>
						   		<a data-href="">
						   			<h1 class="only-line">公司行政公告</h1>
						   			<p class="only-line">近数个月，从个别同事的考勤卡上发现缺勤或...</p>
						   			<span></span>
						   		</a>
						   	</li>-->
				    	</ul>
			        </div>
			    </div>
			    
		    </div>
		 <footer>
			 <nav class="mui-bar mui-bar-tab guanli-footer">
			 	<a class="mui-tab-item mui-active" id="gongzuo">
			 		<span class="mui-icon  iconfont icon-gongzuoshi"></span>
			 		<span class="mui-tab-label ">工作</span>
			 	</a>
			 	<a class="mui-tab-item " data-href="tongzhi.html">
			 		<span class="mui-icon iconfont icon-tongzhi-active"></span>
			 		<span class="mui-tab-label">通知</span>
			 	</a>
			 	<a class="mui-tab-item" data-href="gerenzhongxin.html">
			 		<span class="mui-icon iconfont icon-Personal"></span>
			 		<span class="mui-tab-label">我的</span>
			 	</a>
			 </nav>
		 </footer>
		</div>
		<script src="../js/jquery-1.8.0.min.js"></script>
		<script src="../js/mui.min.js"></script>
		<script type="text/javascript" src="../js/head_public.js" ></script>
		<script type="text/javascript" src="../js/common.js" ></script>
		<script type="text/javascript" src="../js/session.js" ></script>
		<script type="text/javascript" src="../css/calendar/calendar.js" charset="utf-8"></script>
		<script type="text/javascript">
			// $("footer").load("footer2.html")
			$(".mui-content").on("tap","a[data-href]",function(){
				location.href=$(this).attr("data-href");
				mui.openWindow({url:$(this).attr("data-href")})
			})
			
			
			var page=1;
			var userid="";
			userid=getCookie("userid");
			 var work=getCookie("work");
             var userid=getCookie("userid");
			if(userid==""||userid==null){
				alert("您还没有登录，请先登录")
				location.href="../public/login.html"
			}
		var $height = $(window).height();
		var $height1 = $("header").height();
		$(".mui-scroll-wrapper").height( $height - $height1 );
		mui.init({
			pullRefresh: {
				
				container: '#pullrefresh',
				down: {
					style:'circle',
					callback: pulldownRefresh
				},
				up: {
					contentrefresh: '正在加载...',
					callback: pullupRefresh
				}
			}
		});
		/**
		 * 下拉刷新具体业务实现
		 */
		function pulldownRefresh() {
			setTimeout(function() {
				mui('#pullrefresh').pullRefresh().endPulldownToRefresh();
				getContents();
			}, 1500);
		}
		/**
		 * 上拉加载具体业务实现
		 */
		function pullupRefresh() {
			setTimeout(function() {
				mui('#pullrefresh').pullRefresh().endPullupToRefresh(); //参数为true代表没有更多数据了。
				getContents();
			}, 1500);
		}
		function getContents(){
		     //	 读取列表
            data={};
            data.page=page;
            data.member_id=userid;
            data.ac_id ="11";
			$.post(net+"/public/index.php?s=api/elevator/notice",data,function(data){
               if(data.code==200){
	               	if(data.result!=null&&data.result!=""&&data.result.length!=0){
	               		var str="";
	               		
	               		$.each(data.result, function(i,value) {
	               			
	               	   	    str+='<li><a data-href="gonggaoinfo.html?id='+this.article_id+'"><h1 class="only-line">'+this.article_title+'</h1><p class="only-line">'+this.description+'</p><span></span></a></li>'
	
	               		});
	               	  
	               	   $(".gg-list").append(str);
	               	   page++;
	               	}else{
	               		alert("没有更多数据")
	               	}
               }
			   },'json'
			);
		}
		getContents();

		</script>
	</body>

</html>